package com.hightrast.service.controller;


import com.hightrast.service.api.baseEntity.R;
import com.hightrast.service.api.domain.qo.rastRole.QueryRastRoleListQo;
import com.hightrast.service.api.entity.RastRole;
import com.hightrast.service.service.IRastRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 角色表 前端控制器
 * </p>
 *
 * @author hx
 * @since 2025-01-11
 */
@RestController
@RequestMapping("/api/rast-role")
@Api(tags = "角色")
public class RastRoleController {

    @Resource
    IRastRoleService roleService;

    @ApiOperation("查询角色列表")
    @PostMapping("/queryRoles")
    public R<List<RastRole>> queryRoles(@RequestBody QueryRastRoleListQo qo) {
        return R.data(roleService.queryRoles(qo));
    }
}
